public class RedStoneLampBlock : BlockMaterial
{
    public RedStoneLampBlock() : base("redstone_lamp")
    {
        redstone = true;
        SetDisplayName("红石灯");
        SetStateMax(2);
        SetTickEvent(Tick);
    }
    public void Tick(UpdataTickEvent e)
    {
        if (e.block.power > 0)
        {
            if (e.block.State == 0) e.block.SetState(1);
        }
        else if (e.block.State == 1) e.block.SetState(0);
    }
}